tag @s add rmr.cur_axe

execute if entity @e[tag=rmr.axe_target] run tag @s add rmr.suicide

$execute as @e[tag=rmr.axe_target] run damage @s $(damage) minecraft:player_attack by @n[tag=rmr.cur_axe] from @n[tag=rmr.connect.owner]
tag @e[tag=rmr.axe_target] remove rmr.axe_target
tag @s remove rmr.cur_axe
tag @n[tag=rmr.connect.owner] remove rmr.connect.owner

execute as @s[tag=rmr.suicide] run kill @s